package com.mall.service.mallRecommend;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mall.client.mallRecommend.MallRecommendService;
import com.mall.custom.dao.read.MallRecommendReadMapper;
import com.mall.custom.dao.write.MallRecommendWriteMapper;
import com.mall.pojo.MallRecommend;
import com.mall.pojo.MallRecommendExample;
import com.mall.pojo.MallRecommendExample.Criteria;
@Service
public class MallRecommendServiceImpl implements MallRecommendService {
	@Autowired
	private MallRecommendReadMapper MallRecommendReadMapper;
	@Autowired
	private MallRecommendWriteMapper MallRecommendWriteMapper;
	
	/**
	 * 得到对象条件的推荐集合
	 */
	@Override
	public List<MallRecommend> getMallRecommendListByMallCommendExample(MallRecommendExample mallRecommendExample) {
		
		return this.MallRecommendReadMapper.selectByExample(mallRecommendExample);
	}

	/**
	 * 增加推荐
	 */
	@Override
	public int insertMallRecommendByMallRecommend(MallRecommend mallRecommend) {
		// TODO Auto-generated method stub
		return this.MallRecommendWriteMapper.insert(mallRecommend);
	}

	/**
	 * 修改推荐
	 */
	@Override
	public int modifyMallRecommendByMallRecommend(MallRecommend mallRecommend) {
		// TODO Auto-generated method stub
		return this.MallRecommendWriteMapper.updateByPrimaryKey(mallRecommend);
	}

}
